(ctext-pre-write-conversion): Fix the values of FROM and TO if we create
authorEli Zaretskii <eliz@gnu.org>
Mon, 17 Jun 2002 10:25:07 +0000 (10:25 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 17 Jun 2002 10:25:07 +0000 (10:25 +0000)
a new buffer.

lisp/international/mule.el

index f9ec6cdfc497623c539a2628261584d2ce1e25a6..574c7213dc9df0f605d54ea422a5042166b07e9e 100644 (file)
@@ -1367,6 +1367,8 @@ charsets or coding systems.")
       (set-buffer-modified-p modified-p)
       (- (point-max) (point-min)))))
 
+;; If you add charsets here, be sure to modify the regexp used by
+;; ctext-pre-write-conversion to look up non-standard charsets.
 (defvar non-standard-designations-alist
   '(("$(0" . (big5 "big5-0" 2))
     ("$(1" . (big5 "big5-0" 2))
@@ -1408,7 +1410,8 @@ text, and convert it in the temporary buffer.  Otherwise, convert in-place."
           (buffer-disable-undo)
           (if (stringp from)
               (insert from)
-            (insert-buffer-substring buf from to)))))
+            (insert-buffer-substring buf from to))
+          (setq from (point-min) to (point-max)))))
   (encode-coding-region from to 'ctext-no-compositions)
   ;; Replace ISO-2022 charset designations with extended segments, for
   ;; those charsets that are not part of the official X registry.